package com.zz.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name="statistics")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Statistics {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer ID;
	private Integer PeopleNums;
	private Integer ReadRoomId;
	private Integer Year;
	private Integer Month;
	private Integer day;
	@ManyToOne(targetEntity=ReadRooms.class,fetch=FetchType.EAGER)
	@JoinColumn(name="ReadRoomsId",referencedColumnName="Id")
	private ReadRooms readrooms;
}
